﻿using PMS.Data.Entities.Messages;
using System.Collections.Generic;

namespace PMS.Services.EntityServices.Messages
{
    /// <summary>
    /// Message template service
    /// </summary>
    public partial interface ISMSTemplateService
    {
        /// <summary>
        /// Delete a message template
        /// </summary>
        /// <param name="messageTemplate">Message template</param>
        void DeleteMessageTemplate(ShortMessageTemplate messageTemplate);

        /// <summary>
        /// Inserts a message template
        /// </summary>
        /// <param name="messageTemplate">Message template</param>
        void InsertMessageTemplate(ShortMessageTemplate messageTemplate);

        /// <summary>
        /// Updates a message template
        /// </summary>
        /// <param name="messageTemplate">Message template</param>
        void UpdateMessageTemplate(ShortMessageTemplate messageTemplate);

        /// <summary>
        /// Gets a message template by identifier
        /// </summary>
        /// <param name="messageTemplateId">Message template identifier</param>
        /// <returns>Message template</returns>
        ShortMessageTemplate GetMessageTemplateById(int messageTemplateId);

        /// <summary>
        /// Gets message template by the name
        /// </summary>
        /// <param name="messageTemplateName">Message template name</param>
        /// <param name="storeId">Store identifier; pass null to load all records</param>
        /// <returns>message templates</returns>
        ShortMessageTemplate GetMessageTemplateByName(string messageTemplateName, int? storeId = null);

        /// <summary>
        /// Gets all message templates
        /// </summary>
        /// <param name="storeId">Store identifier; pass 0 to load all records</param>
        /// <param name="accountId">null to load all SMSTemplates, or load SMSTemplate corresponding to accountId</param>
        /// <returns>Message template list</returns>
        IList<ShortMessageTemplate> GetAllMessageTemplates(int storeId, int? accountId = null);

    }
}
